package com.payment.ktb.activity.main1;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.payment.ktb.R;
import com.payment.ktb.activity.BaseActivity;
import com.payment.ktb.constants.ConstantsPay;
import com.squareup.picasso.Picasso;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by syd on 2016/6/9.
 */
public class WeixinOrderConfirmActivity extends BaseActivity {







    @BindView(R.id.tv_weixinorderconfirm_amount)
    TextView tv_weixinorderconfirm_amount;
    @BindView(R.id.tv_weixinorderconfirm_time)
    TextView tv_weixinorderconfirm_time;
    @BindView(R.id.tv_weixinorderconfirm_orderno)
    TextView tv_weixinorderconfirm_orderno;
    @BindView(R.id.iv_weixinorderconfirm_qrcode)
    ImageView iv_weixinorderconfirm_qrcode;
    @BindView(R.id.tv_weixinorderconfirm_scantext)
    TextView tv_weixinorderconfirm_scantext;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_weixinorderconfirm);
        ButterKnife.bind(this);
        initTitle("确认订单");
        initData();
    }


    /**
     *
     */
    private void initData() {
        tv_weixinorderconfirm_amount.setText(ConstantsPay.amount + "元");
        tv_weixinorderconfirm_time.setText(ConstantsPay.orderTime);
        tv_weixinorderconfirm_orderno.setText(ConstantsPay.orderNo);
        if (!TextUtils.isEmpty(ConstantsPay.qrcode)) {
            Picasso.with(mContext).load(ConstantsPay.qrcode).fit().into(iv_weixinorderconfirm_qrcode);
            tv_weixinorderconfirm_scantext.setVisibility(View.VISIBLE);
        } else {
            tv_weixinorderconfirm_scantext.setVisibility(View.GONE);
        }
    }




}
